<?php

include_once BONE_ROOT.DS.'controllers'.DS.'vars.php';

class controller_team extends controller_theme
{

	public function __construct()
	{
		parent::__construct();
	}
	

	// 团队成员列表
	public function users()
	{
		$model = bone::get_model('team');
		$users = $model->get_users(0, 3);

		$template = bone::get_template('team.users');
		$template->set_title('开发团队');
		$template->set('users', $users);
		$template->set_data($this->get_data());
		$template->display();
	}


	// 团队成员详情
	public function user_detail()
	{
		$user_id = get('user_id', 0, 'int');
		if(!$user_id) exit;

		$model = bone::get_model('team');
		$user = $model->get_user($user_id);
		if(!$user) exit;

		$template = bone::get_template('team.user_detail');
		$template->set_title('开发团队成员 '.$user->name.' 资料' );
		$template->set_meta_keyword($user->name.' '.$user->job.' '.$user->description );
		$template->set_meta_description( $user->description );
		$template->set('user', $user);
		$template->set_data($this->get_data());
		$template->display();
	}




}
?>